/*
 * InputArray.cpp
 *
 *  Created on: Mar 28, 2011
 *      Author: skyang
 */
#ifndef InputArray_H
#define InputArray_H


#include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

using namespace std;

class InputArray{
public:
	int index;
	int ArrayLength;
	double CurrentArray [500];
	double PushElement;
	double PopElement;
	double ArrayMax;
	double ArrayMin;


	InputArray() {
		  ArrayLength = 500;
		  index = 0;
	}

	InputArray(int N){
		if (N > 500)
 			cout << "Array too long." << endl;
		  ArrayLength = N;
		  index = 0;
	}


	// Destructor
	~InputArray() {
		ArrayLength = 0;
		index = 0;
		//delete [] CurrentArray;
	}

//public:
	bool UpdateArray(fstream & myfile);
	bool InitiateArray(fstream & myfile);
	double * getArray();
	double getPopElement();
	double getPushElement();
	int getArrayLength();
	void PrintElements(bool printWholeArray);

};


#endif
